<?php
class AjaxtestController extends AppController{
    var $uses=null;
    var $helpers = array('Js' => array('Jquery'));

    function index(){
        if(!isset ($_SESSION['amount'])){
            $_SESSION['amount']=1;
        }
        $this->set('amount',$_SESSION['amount']);
        $this->log('entered ajaxtest index','info');
    }

    function increment(){
        $_SESSION['amount']=$_SESSION['amount']+1;
        $this->layout='ajax';
        $this->set('newamount',$_SESSION['amount']);
        $this->log('amount incremented','warn');
    }

    
}
?>
